package jdklearning.number;



/**
 * 字符和数字(整型)互相转换
 * 核心是字符的asc编码
 *
 * @author shenenlu 2021年05月03日 上午01:13:14
 */
public class CharAndNumberLearning {

    public static void main(String[] args) {
        System.out.println((int)'0');
        System.out.println((int)'1');
        System.out.println((int)'9');
        System.out.println((int)'a');
        System.out.println((int)'A');
        System.out.println((int)'z');
        System.out.println((int)'Z');

        System.out.println( Character.isDigit('0'));
        System.out.println( Character.isDigit('a'));
        System.out.println( Character.isLetter('0'));
        System.out.println( Character.isLetter('a'));
        System.out.println( Character.isUpperCase('0'));
        System.out.println( Character.isUpperCase('a'));
        System.out.println( Character.isUpperCase('A'));
    }

}
